package com.glsc.ngateway.common.base.domain.mysql.opmanage.report.regulatory;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;
import java.math.BigInteger;
import java.util.Objects;

/**
 * @author: qiyr
 * @date: 2022/8/31 14:48
 * @description: 债券业务管理系统数据实体类
 */
@Data
@Entity
@Table(name = "t_reg_rpt_bond_mng")
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
@IdClass(RegRptBondMng.PK.class)
public class RegRptBondMng {
    public static class PK implements Serializable {
        private BigInteger mainId;
        private Integer rowId;

        public BigInteger getMainId() {
            return mainId;
        }

        public void setMainId(BigInteger mainId) {
            this.mainId = mainId;
        }

        public Integer getRowId() {
            return rowId;
        }

        public void setRowId(Integer rowId) {
            this.rowId = rowId;
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) {
                return true;
            }
            if (o == null || getClass() != o.getClass()) {
                return false;
            }
            PK pk = (PK) o;
            return Objects.equals(mainId, pk.mainId) && Objects.equals(rowId, pk.rowId);
        }

        @Override
        public int hashCode() {
            return Objects.hash(mainId, rowId);
        }
    }

    @Id
    @Column(name = "main_id")
    private BigInteger mainId;

    @Id
    @Column(name = "row_id")
    private Integer rowId;

    @Column(name = "situation")
    private String situation;

    @Column(name = "sh")
    private Double sh;

    @Column(name = "sz")
    private Double sz;

    @Column(name = "yhj")
    private Double yhj;

    public RegRptBondMng() {
    }

    public RegRptBondMng(BigInteger mainId, Integer rowId, String situation, Double sh, Double sz, Double yhj) {
        this.mainId = mainId;
        this.rowId = rowId;
        this.situation = situation;
        this.sh = sh;
        this.sz = sz;
        this.yhj = yhj;
    }

    public BigInteger getMainId() {
        return mainId;
    }

    public void setMainId(BigInteger mainId) {
        this.mainId = mainId;
    }

    public Integer getRowId() {
        return rowId;
    }

    public void setRowId(Integer rowId) {
        this.rowId = rowId;
    }

    public String getSituation() {
        return situation;
    }

    public void setSituation(String situation) {
        this.situation = situation;
    }

    public Double getSh() {
        return sh;
    }

    public void setSh(Double sh) {
        this.sh = sh;
    }

    public Double getSz() {
        return sz;
    }

    public void setSz(Double sz) {
        this.sz = sz;
    }

    public Double getYhj() {
        return yhj;
    }

    public void setYhj(Double yhj) {
        this.yhj = yhj;
    }
}

